package com.g5.edu.controller;


import com.g5.edu.model.DfExamPlan;
import com.g5.edu.service.IDfExamPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 考试安排 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-10-29
 */
@RestController
@RequestMapping("/edu/dfExamPlan")
public class DfExamPlanController {
    @Autowired
    private IDfExamPlanService dfExamPlanService;
    //根据 id 查询问题详情
// SpringMvc支持我们编写匹配占位符的url
// {id}就是占位符
// 在整个控制器所有方法中,没有精确匹配时,会启动占位符匹配
    @GetMapping("/get_plan_detail/{id}")
    public DfExamPlan dfExamPlan(
            // 要想获得{id}匹配的值
            // 1.必须编写@PathVariable开头
            // 2.参数名称必须和{}里的名称一致
            @PathVariable Integer id){
        DfExamPlan detail=dfExamPlanService.getDetailById(id);
        return detail;
    }


}
